
package guoan.core.configuration;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * ClassName:FilterConfig <br/>
 * Function: TODO ADD FUNCTION. <br/>
 * Reason: TODO ADD REASON. <br/>
 * Date: 2015年2月5日 下午3:26:49 <br/>
 * 
 * @version
 * @since JDK 1.7
 * @see
 */
@Configuration
@EnableConfigurationProperties(WeiXinProperties.class)
public class WeiXinConfiguration {
    @Autowired
    private WeiXinProperties weiXinProperties;

    @Bean(name = "weiXinCfgBean")
    public WeiXinCfgBean loginFilter(){
        WeiXinCfgBean bean = WeiXinCfgBean.withDefault();
        bean.setAppid(weiXinProperties.getAppid());
        bean.setAppscret(weiXinProperties.getAppscret());
        bean.setHost(weiXinProperties.getHost());

        return bean;
    }

}
